package com.ruoyi.user.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.system.api.model.request.AppUserBalanceAocRequest;
import com.ruoyi.user.model.pojo.entity.Balance;
import com.ruoyi.user.model.pojo.result.app.AppUserBalanceResult;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 用户余额表 服务类
 * </p>
 *
 * @author Gnc
 * @since 2024-12-24
 */
public interface IBalanceService extends IService<Balance> {




    /**
     * 增加余额
     */
    boolean aocBalance(Long userId, Integer type, String content, Integer balType, BigDecimal money);

    /**
     * 批量增加余额
     */
    boolean aocBalanceBatch(List<AppUserBalanceAocRequest> requests, Integer type, String content, Integer balType);

    /**
     * 扣减余额
     */
    boolean docBalance(Long userId, Integer type, String content, Integer balType, BigDecimal money);


    boolean incAndDcoBalance(Long userId, Integer type, String content, Integer balType, BigDecimal money, boolean flag);


    AppUserBalanceResult balance(Long userId);
}
